CopyToSegmentFields

4Description

This business rule is used to copy one or more segment field values from an activity to a segment. A MathVariable or a field name can be used to place a single value into a segment field and an array can be used to place multiple values into multiple segments.

215CopyToSegmentFields Element/Attribute Table

Element/Tag

Definition

Attribute

Element/Attribute Value and Description

<CopyToSegmentFields>

The required opening and closing elements of this business rule.

SEGMENTGUID

Enter actual GUID for SEGMENTGUID value.

     <Fields>

Required/Repeatable element;
Used to specify the MathVariables in transactions from which the values should be copied from, and fields in the Segment screen to which values should be copied to.

 

 

         <Field>

Required / Repeatable element;
The opening and closing tag that encompasses <From> and <To> or <FromCollection> and <To> tags.
Note:

Either <From> or <FromCollection> tag should be used. Both of them should not be present for a single <To> tag.

 

 

                <From>

Required element;
This element is used to specify the MathVariable or field name from the transaction from where the data should be copied from.
Note:

This tag should be used to copy a single value to one or more segments.

 

Required element value;
MathVariable/ActivityField

Name of MathVariable or field from the transaction.

               <FromCollection>

Required element;
This element is used to specify a MathVariable of math type Collection.
Note:

This tag should be used to copy a list of values to one or more segments. For example, if there are two segments with the same FieldName Field1, but the value "A" should be copied to Segment1 and the value "B" should be copied to Segment2, then this tag should be used.

  • A MathVariable of math type Collection contains a list of key-value pairs retrieved from the database.

 

 

Required element value;
MathVariable

Name of the MathVariable of math type Collection that is defined in the transaction, where the data should be copied from.

                  <To>

Required element;
This element is used to specify the fields in the Segment screen to which the data should be copied to.
Note:

The value of the <To> tag will be saved in AsSegment/AsSegmentField table in the database.

 

Required element value;
Field

Name of the field in Segment screen where the value should be copied to.

 

216XML Example

<CopyToSegmentFields SEGMENTGUID="String">

        <Fields>

                <Field>

                        <FromSegment>String</FromSegment>

                        <To>String</To>

                </Field>

        </Fields>

</CopyToSegmentFields>


216Schema Example

<CopyToSegmentFields>

    <Fields>

        <Field>

            <From>[Field|MathVariable]</From>

            <To>[MathVariable]</To>

        </Field>

        <Field>

            <FromCollection>[MathVariableCollection]</FromCollection>

            <To>[MathVariable]</To>

        </Field>

    </Fields>

</CopyToSegmentFields>